sampler TextureSampler : register(s0);
float2 PixelOffset;
const float4 Kernel = float4(0.4744296760, 0.2339264214, 0.0280415211, 0.0008172195);

float4 BlurFunction(float2 TexCoord : TEXCOORD0) : COLOR0
{
	float4 color = tex2D(TextureSampler, TexCoord) * Kernel.x; 
	color += tex2D(TextureSampler, TexCoord + PixelOffset * 1) * Kernel.y; 
	color += tex2D(TextureSampler, TexCoord + PixelOffset * 2) * Kernel.z; 
	color += tex2D(TextureSampler, TexCoord + PixelOffset * 3) * Kernel.w; 
	color += tex2D(TextureSampler, TexCoord - PixelOffset * 1) * Kernel.y; 
	color += tex2D(TextureSampler, TexCoord - PixelOffset * 2) * Kernel.z; 
	color += tex2D(TextureSampler, TexCoord - PixelOffset * 3) * Kernel.w;  
    return color;
}

technique Technique1
{
    pass Pass1
    {
        // TODO: set renderstates here.
        PixelShader = compile ps_2_0 BlurFunction();
    }
}
